﻿<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >

  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Shared.xaml" />
    <ResourceDictionary Source="ResizeGrip.xaml" />
  </ResourceDictionary.MergedDictionaries>

  <Style x:Key="{x:Type Window}" TargetType="Window">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Window}">
          <Grid Background="{StaticResource WindowGradientBackgroundBrush}">
            <AdornerDecorator>
              <ContentPresenter/>
            </AdornerDecorator>
            <ResizeGrip x:Name="WindowResizeGrip"
              HorizontalAlignment="Right"
              VerticalAlignment="Bottom"
              Visibility="Collapsed" 
              IsTabStop="false"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="ResizeMode" Value="CanResizeWithGrip">
              <Setter TargetName="WindowResizeGrip" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  
    <Style x:Key="{x:Type GridSplitter}" TargetType="{x:Type GridSplitter}">
      <Setter Property="Foreground" Value="{StaticResource GlyphBrush}" />
      <Setter Property="Background" Value="Transparent" />
      <Setter Property="SnapsToDevicePixels" Value="True" />
      <Setter Property="Focusable" Value="False" />
      <Setter Property="Padding" Value="7" />
      <Setter Property="Margin" Value="2" />
      <Style.Triggers>
        <Trigger Property="ResizeDirection" Value="Rows">
          <Setter Property="Height" Value="10"/>
          <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                  <Border Background="{TemplateBinding Background}" Padding="1">
                    <Canvas Width="19" Height="4">
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Left="0" Canvas.Top="1" />
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Left="4" Canvas.Top="1" />
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Left="8" Canvas.Top="1" />
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Left="12" Canvas.Top="1" />
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Left="16" Canvas.Top="1" />
                    </Canvas>
                  </Border>
                </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Trigger>
        <Trigger Property="ResizeDirection" Value="Columns">
          <Setter Property="Width" Value="10"/>
          <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                  <Border Background="{TemplateBinding Background}" Padding="1">
                    <Canvas Height="19" Width="4">
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Top="0" Canvas.Left="1" />
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Top="4" Canvas.Left="1" />
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Top="8" Canvas.Left="1" />
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Top="12" Canvas.Left="1" />
                        <Rectangle Fill="{TemplateBinding Foreground}" Width="2" Height="2" Canvas.Top="16" Canvas.Left="1" />
                    </Canvas>
                  </Border>
                </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Trigger>
      </Style.Triggers>
    </Style>
</ResourceDictionary>
